/**
 * 继承策略
 */
import {Enum} from '../../../../../tnxjs/tnxcore';

export default class InheritanceStrategy extends Enum {

    static name = 'InheritanceStrategy';

    desc = '';

    constructor(caption, desc) {
        super(caption);
        this.desc = desc;
    }

    static TABLE_PER_CLASS = new InheritanceStrategy('每类一表',
        '每个类单独一张表（抽象父类没有表），子类表包含从父类继承的字段和自身的特有字段');
    static JOINED = new InheritanceStrategy('联合表',
        '父类表包含公共字段，子类表只含特有字段，通过主键与父类表主键关联');
    static SINGLE_TABLE = new InheritanceStrategy('共用单表',
        '父类表包含所有子类的字段，子类特有字段作为该表中的可空字段存在');

}
